package com.xingen.utils;

import com.xingen.service.CreateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Description :运行生成文档
 * @Author : 辛根
 * @Date : 2020/4/17 11:17
 */
@Component
public class ApplicationRunnerImpl implements ApplicationRunner {

    @Autowired
    private CreateService createService;

    @Value("${dataName}")
    private String dataName;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        createService.getTableInfo(dataName);
        System.out.println("导出成功");
    }
}
